package lgrpccurator.demo.controller;

import lgrpccurator.demo.client.WatcherApi;
import lgrpccurator.demo.client.ZkApi;
import lgrpccurator.demo.zookeeperRegister.ZookeeperRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@RequestMapping("/api")

public class api {
@Autowired
    ZkApi api;

    @Autowired
    ZookeeperRegister regster;
@PostMapping("/getData")
    public void getdata(){
        WatcherApi watcherApi = new WatcherApi();
    String data = api.getData("/lg-curator", watcherApi);
    System.out.println("数据"+data);


}
}
